package kin.context.system;

public class PagingContext {
private static ThreadLocal currentPage=new ThreadLocal();
private static ThreadLocal pagesize=new ThreadLocal();
 
   
public static int getCurrentPage(){   
    Integer os=(Integer)currentPage.get();   
    if(os==null){   
        return 1;   
    }   
    return os;   
}   
   
public static void setCurrentPage(int currentPageValue){   
	currentPage.set(currentPageValue);   
}   
   
//仅仅是删除当前线程的值，不影响别的线程的值   
public static void removeCurrentPage(){   
	currentPage.remove();   
}   
   
public static int getPagesize(){   
    Integer ps=(Integer)pagesize.get();   
    if(ps==null){   
        return Integer.MAX_VALUE;    
    }   
    return ps;   
}   
   
public static void setPagesize(int pagesizevalue){   
    pagesize.set(pagesizevalue);   
}   
public static void removePagesize(){   
	pagesize.remove();    
}   



}
